﻿@model IEnumerable<CloudFranceTriple.Models.ForumSecuritySet>
@{
    ViewBag.Title = String.Format("{0} - {1}", ViewBag.LabelForum, CloudFranceTriple.WebRole.Properties.Resources.ForumSecurityTitle);
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="content-padding">
    <h1>@ViewBag.LabelForum - @CloudFranceTriple.WebRole.Properties.Resources.ForumSecurityTitle</h1>
    <section>
        <p>
            @{if ((ViewBag.ShowForumSecuritySetAddButton as Boolean?) ?? true)
              {
                @Html.ActionLink(@CloudFranceTriple.WebRole.Properties.Resources.ForumSecurityAddButton, "Create", new { id = (ViewBag.ForumSet_Id as int?), area = "forum" });
              }
            }
        </p>
        <table>
            <tr>
                <th>
                    @CloudFranceTriple.WebRole.Properties.Resources.SecurityRoleName
                </th>
                <th>
                    @CloudFranceTriple.WebRole.Properties.Resources.SecurityRightLevel
                </th>
                <th></th>
            </tr>
            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        @Html.DisplayFor(modelItem => item.webpages_Roles.RoleName)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => CloudFranceTriple.WebRole.Models.RightLevel.GetRightLevelSelectListItems()[item.RightLevel].Text)
                    </td>
                    <td>
                        @Html.ActionLink(@CloudFranceTriple.WebRole.Properties.Resources.ButtonEdit, "Edit", new { id = ViewBag.ForumSet_Id, id2 = Html.DisplayTextFor(modelItem => item.webpages_Roles.RoleId) }) |
                        @Html.ActionLink(@CloudFranceTriple.WebRole.Properties.Resources.ButtonDelete, "Delete", new { id = ViewBag.ForumSet_Id, id2 = Html.DisplayTextFor(modelItem => item.webpages_Roles.RoleId) })
                    </td>
                </tr>
            }
        </table>
        <br />
        @Html.Partial("_BackToForumList")
    </section>
</div>
